package com.aaa.system.controller.api;

import com.aaa.security.annotation.MyLog;
import com.aaa.system.service.DeptService;
import com.aaa.system.service.MenuService;
import com.aaa.vo.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Author 崔灿
 * @Date 2023/02/28 14:06
 * @ClassName ApiDeptController
 * @Description
 * @Version 1.0
 */

@Api(value = "/system/api/dept", tags = {"api部门控制"})
@RestController
@RequestMapping("/system/api/dept")
public class ApiDeptController {
    @Autowired
    private DeptService deptService;

    /**
     * 根据id查询所有菜单
     * @return
     */
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "query", dataType = "int", name = "id", value = "", required = true)
    })
    @ApiOperation(value = "根据id查询所有菜单", notes = "根据id查询所有菜单", httpMethod = "GET")
    @MyLog(title = "查询所有部门")
    @GetMapping("/finddept")
    public Result finddept(Integer id){
        return deptService.finddept(id);
    }

}
